﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Items : MonoBehaviour
{

    public GameObject pref;


    // Start is called before the first frame update
    void Start()
    {
        Sprite[] sprites = Resources.LoadAll<Sprite>("items");
        foreach( var spr in sprites)
        {
            var inst = GameObject.Instantiate(pref,transform);
            inst.transform.GetChild(0).GetComponent<Image>().sprite = spr;
        }
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
